home *** CD-ROM | disk | FTP | other *** search
/ CBM Funet Archive / cbm-funet-archive-2003.iso / cbm / demodisks / drives / 1581-demo.lzh / burst subs.lst < prev    next >
File List  |  1994-10-19  |  59KB  |  989 lines

  1.  
  2.  
  3. .main.  hcd65xx v3.1    03-23-87                                                                                page     1
  4.                                                                                                         0:burst subs.src,s,r
  5.  
  6. error addr  code          seq   source statement
  7.  
  8.                            1    ;************************************************************************
  9.                            2    ;*                                                                      *
  10.                            3    ;*                          ------------------                          *
  11.                            4    ;*  ----------------------  BURST  SUBROUTINES  ----------------------  *
  12.                            5    ;*                          ------------------                          *
  13.                            6    ;*                                                                      *
  14.                            7    ;* These assembly language routines are provided for your convenience.  *
  15.                            8    ;* For most users, the BURST commands are very cryptic, requiring you   *
  16.                            9    ;* to write your own assembly language programs to make use of them.    *
  17.                           10    ;* The set of assembly language subroutines provided in this listing    *
  18.                           11    ;* are designed to allow anyone to make use of the BURST routines very  *
  19.                           12    ;* easily.  A BASIC program needs simply to POKE the appropriate values *
  20.                           13    ;* into the variable locations shown below, and then SYS to the desired *
  21.                           14    ;* routine.  All of the BURST protocol and handshaking is done for you. *
  22.                           15    ;* The BASIC program can then PEEK any values returned.                 *
  23.                           16    ;*                                                                      *
  24.                           17    ;* The routines in this listing that require data buffer storage areas  *
  25.                           18    ;* are passed the location of the buffer in BUFLOC.  BUFLOC points to   *
  26.                           19    ;* RAM location in RAM bank 0 of the start of the buffer.  Since the    *
  27.                           20    ;* KERNEL and I/O are needed, RAM exists only up to $C000.  So, you are *
  28.                           21    ;* free to use any RAM past your BASIC text program, up to $C000 (BASIC *
  29.                           22    ;* text normally starts at $1C00.  If bit-map graphics are enabled,     *
  30.                           23    ;* then BASIC text starts at $4000).  If you want to PEEK and POKE this *
  31.                           24    ;* memory from BASIC, be sure to execute the 'BANK 0' command.  This    *
  32.                           25    ;* tells BASIC to PEEK and POKE to the RAM under the BASIC ROMs.        *
  33.                           26    ;* If you want to make your program real intelligient, there are        *
  34.                           27    ;* pointers to the beginning and end of BASIC text ($002D and $1210,    *
  35.                           28    ;* respectively).  As a general rule, work your way back from $C000,    *
  36.                           29    ;* and you'll be OK.                                                    *
  37.                           30    ;*                                                                      *
  38.                           31    ;* To use these routines, your BASIC program must BLOAD the file        *
  39.                           32    ;* 'BURST SUBS.BIN' before they can be used.  They load at $1300, so    *
  40.                           33    ;* they are in a safe place below BASIC text area.                      *
  41.                           34    ;*                                                                      *
  42.                           35    ;* There is no BURST FORMAT routine provided.  BURST formats can be     *
  43.                           36    ;* accomplished easily from BASIC.  For example, the following BASIC    *
  44.                           37    ;* commands will format physical tracks 10 through 20 of the disk with  *
  45.                           38    ;* 5 1024 byte sectors:                                                 *
  46.                           39    ;*                                                                      *
  47.                           40    ;*     OPEN 1,8,15                                                      *
  48.                           41    ;*     PRINT#1,"U0";CHR$(3);CHR$(20);CHR$(5);CHR$(10);                  *
  49.                           42    ;*                                                                      *
  50.                           43    ;* Note the use of the semicolon (;) at the end of the statement.  This *
  51.                           44    ;* is very important!  If there was no semicolon, the C128 would        *
  52.                           45    ;* send a carriage return after the last parameter.  Since the 1581     *
  53.                           46    ;* counts the number of bytes sent to determine the number of optional  *
  54.                           47    ;* parameters that are being sent, it would misinterpret the carriage   *
  55.                           48    ;* return as the next optional parameter.  In this case, it would be    *
  56.                           49    ;* fill byte.  Any formatting errors can be checked via the command     *
  57.                           50    ;* channel.                                                             *
  58.                           51    ;*                                                                      *
  59.                           52    ;* Since the BURST commands make use of the command channel to the      *
  60.                           53    ;* drive, the command channel must first be OPENed in your BASIC        *
  61.                           54    ;* program.  The logical file number which you assigned to the command  *
  62.                           55    ;* channel should be poked to LF before calling any of these routines.  *
  63.                           56    ;*                                                                      *
  64.                           57    ;************************************************************************
  65.  
  66.  
  67.  
  68.  
  69. .main.  hcd65xx v3.1    03-23-87                                                                                page     2
  70.                                                                                                         0:burst subs.src,s,r
  71.  
  72. error addr  code          seq   source statement
  73.  
  74.                           58    
  75.                           59    
  76.                           60    
  77.                           61    ;************************************************************************
  78.                           62    ;  Variables - Values from BASIC can be POKEd, PEEKed to these areas.
  79.                           63    ;************************************************************************
  80.            =1300          64            *=$1300
  81.                           65    
  82.       1300 00             66    STATUS  .byte 0                 ; status byte
  83.       1301 08             67    DEV     .byte 8                 ; device number
  84.       1302 08             68    LF      .byte 8                 ; logical file number
  85.       1303 =1304          69    TRACK   *=*+1                   ; track 
  86.       1304 =1305          70    SECTOR  *=*+1                   ; sector
  87.       1305 =1306          71    NUMSEC  *=*+1                   ; Number of sectors.
  88.       1306 =1308          72    BUFLOC  *=*+2                   ; Page # of buffer to get/put data.
  89.       1308 =1309          73    SECSIZE *=*+1                   ; Sector size (1=256, 2=512, 4=1024)
  90.       1309 =130a          74    SIDE    *=*+1                   ; Physical side of the disk (0 or 1).
  91.       130a =130b          75    MINSEC  *=*+1                   ; Minimum logical sector found in QUERY.
  92.       130b =130c          76    MAXSEC  *=*+1                   ; Maximum logical sector found in QUERY.
  93.       130c =130d          77    INTLV   *=*+1                   ; Physical interleave found in QUERY.
  94.       130d =130e          78    FLAG    *=*+1                   ; Empty track flag.
  95.                           79                                    ;  This flag is used to indicate that the
  96.                           80                                    ;  track or data just read contains all 0's.
  97.                           81                                    ;  This is handy in some cases, such as
  98.                           82                                    ;  during a disk copy program.  When a disk
  99.                           83                                    ;  is formatted, the sectors are filled with
  100.                           84                                    ;  0's.  If a sector to be copied contains
  101.                           85                                    ;  all 0's, then we don't bother to
  102.                           86                                    ;  write it to the destination disk (which
  103.                           87                                    ;  can end up saving a great deal of time!).
  104.                           88    
  105.                           89    ;*************************************************************************
  106.                           90    ;  Other variables used in the following routines....
  107.                           91    ;*************************************************************************
  108.                           92    
  109.       130e                93    cmdline
  110.       130e 55 30          94            .byte 'u0'              ; Burst prefix.
  111.            =131a          95            *=*+10                  ; Parameter space for burst command.
  112.       131a =131b          96    cmdlen  *=*+1                   ; Length of the command string (# of bytes).
  113.       131b =131c          97    oldclk  *=*+1                   ; Status of clock line.
  114.       131c =131d          98    temp    *=*+1
  115.                           99    
  116.            =1335         100            *=$1335
  117.       1335 47 52 45      101            .byte 'greg berlin'     ; Written by Greg Berlin, 3/87
  118.       1338 47 20 42             
  119.       133b 45 52 4c             
  120.       133e 49 4e                
  121.                          102    
  122.                          103    ;**************************************************************************
  123.                          104    ;  JUMP TABLE of available burst routines.  SYS to these locations from 
  124.                          105    ;  BASIC.  The BURST routines themselves can then be modified or customized
  125.                          106    ;  without affecting the SYS locations from BASIC.
  126.                          107    ;**************************************************************************
  127.            =1340         108            *=$1340
  128.                          109    
  129.       1340               110    J_INQUIRE_FORMAT        
  130.       1340 4c 148d       111            jmp INQUIRE_FORMAT              
  131.  
  132.  
  133.  
  134.  
  135. .main.  hcd65xx v3.1    03-23-87                                                                                page     3
  136.                                                                                                         0:burst subs.src,s,r
  137.  
  138. error addr  code          seq   source statement
  139.  
  140.       1343               112    J_PHYSICAL_READ
  141.       1343 4c 136b       113            jmp PREAD
  142.       1346               114    J_LOGICAL_READ
  143.       1346 4c 135e       115            jmp LREAD
  144.       1349               116    J_PHYSICAL_WRITE
  145.       1349 4c 13f9       117            jmp PWRITE
  146.       134c               118    J_LOGICAL_WRITE
  147.       134c 4c 13ec       119            jmp LWRITE
  148.       134f               120    J_MEMORY_READ
  149.       134f 4c 1532       121            jmp MEMORY_READ
  150.       1352               122    J_MEMORY_WRITE
  151.       1352 4c 1594       123            jmp MEMORY_WRITE
  152.       1355               124    J_DUMP_CACHE
  153.       1355 4c 15fb       125            jmp DUMP_CACHE
  154.       1358               126    J_QUERY_FORMAT
  155.       1358 4c 14af       127            jmp QUERY_FORMAT
  156.       135b               128    J_COMPARE_MEMORY
  157.       135b 4c 162a       129            jmp COMPARE_MEMORY
  158.                          130    
  159.                          131    ;**************************************************************************
  160.                          132    ;  Locations of important C128 stuff...
  161.                          133    ;**************************************************************************
  162.                          134    
  163.            =ffc9         135    chkout=$ffc9                    ; kernel channel output 
  164.            =ffcc         136    clrchn=$ffcc                    ; kernel clear channel
  165.            =ffba         137    setlfs=$ffba                    ; kernel set logical file number
  166.            =ffbd         138    setnam=$ffbd                    ; kernel set filename
  167.            =ffd2         139    bsout =$ffd2                    ; kernel basic input/output
  168.            =ff47         140    spin_out=$ff47                  ; Set up fast serial for input or output.
  169.                          141                                    ;  SEC for output, CLC for input.
  170.            =dd00         142    d2pra =$dd00                    ; C128 serial port location
  171.            =0010         143    clkout=$10                      ; slow serial clock output bit mask
  172.            =0040         144    clkin =$40                      ; slow serial clock input bit mask
  173.            =dc0d         145    d1icr =$dc0d                    ; 6526 CIA interrupt control register
  174.            =dc0c         146    d1sdr =$dc0c                    ; 6526 CIA serial data register
  175.            =00fa         147    buffer=$fa                      ; zero page pointer variable
  176.            =00fc         148    buffer2=$fc                     ; zero page pointer variable
  177.                          149    
  178.                          150    ;**************************************************************************
  179.                          151    ;  BURST command primitives
  180.                          152    ;**************************************************************************
  181.                          153    
  182.            =0000         154    PBURSTRD =$00                   ; Physical burst read.
  183.            =0002         155    PBURSTWR =$02                   ; Physical burst write.
  184.            =0080         156    LBURSTRD =$80                   ; Logical burst read
  185.            =0082         157    LBURSTWR =$82                   ; Logical burst write.
  186.            =0004         158    BURST_INQUIRE  =$04             ; Burst inquire.
  187.            =009c         159    DUMPCACHE =$9C                  ; Dump track cache ('force' bit set)
  188.            =0086         160    BURST_QUERY =$86                ; Query disk format.
  189.                          161    
  190.                          162    ;**************************************************************************
  191.                          163    ;* -------------------------  BURST ROUTINES ---------------------------- *
  192.                          164    ;**************************************************************************
  193.                          165    
  194.       135e               166    LREAD           ;Logical sector read from the device indicated by LF.
  195.                          167                    ;The track and sector are in TRACK, SECTOR. The location
  196.                          168                    ;of start of the C128 buffer to put the read data in BUFLOC. 
  197.  
  198.  
  199.  
  200.  
  201. .main.  hcd65xx v3.1    03-23-87                                                                                page     4
  202.                                                                                                         0:burst subs.src,s,r
  203.  
  204. error addr  code          seq   source statement
  205.  
  206.                          169                    ;Status byte from drive is returned in STATUS.
  207.                          170    
  208.       135e a9 80         171            lda  #lburstrd          ;logical burst read command
  209.       1360 8d 1310       172            sta  cmdline+2          
  210.       1363 a9 01         173            lda #$01
  211.       1365 8d 1308       174            sta SECSIZE             ;Logical sector size is always 256 bytes.
  212.       1368 4c 1377       175            jmp READ
  213.                          176    
  214.       136b               177    PREAD           ;Physical sector read from device indicated by LF.
  215.                          178                    ;The track and sector are in TRACK, SECTOR. The location
  216.                          179                    ;of start of the C128 buffer to put the read data in BUFLOC.
  217.                          180                    ;The physical sector size in SECSIZE (1=256,2=512,4=1024).
  218.                          181                    ;Number of sectors in NUMSEC. 
  219.                          182                    ;Physical side of the disk in SIDE (0 or 1).
  220.                          183                    ;Status byte from drive is returned in STATUS.
  221.                          184    
  222.       136b a9 00         185            lda #PBURSTRD           ;Physical burst read command.
  223.       136d ae 1309       186            ldx SIDE                ; Check which side to read from.
  224.       1370 f0 02         187            beq 1$
  225.       1372 09 10         188            ora #$10                ; If side 1, then set bit in the command byte.
  226.       1374 8d 1310       189    1$      sta  cmdline+2
  227.                          190    
  228.                          191    
  229.       1377               192    READ
  230.                          193    
  231.       1377 ad ff00       194            lda $ff00               ;Save old MMU setup.
  232.       137a 48            195            pha
  233.                          196    
  234.       137b a9 0e         197            lda #$0e                ;Set MMU for RAM0,KERNEL,I/O.
  235.       137d 8d ff00       198            sta $ff00
  236.                          199    
  237.       1380 20 167d       200            jsr SETU0               ;Put "U0" at start of command string.
  238.                          201    
  239.       1383 ad 1303       202            lda TRACK       
  240.       1386 8d 1311       203            sta CMDLINE+3           ; track
  241.       1389 ad 1304       204            lda SECTOR
  242.       138c 8d 1312       205            sta CMDLINE+4           ; sector
  243.       138f ad 1305       206            lda NUMSEC
  244.       1392 8d 1313       207            sta CMDLINE+5           ; Number of sectors to read.
  245.                          208    
  246.       1395 a9 06         209            lda #$06                ; Length of command string.
  247.       1397 8d 131a       210            sta CMDLEN
  248.       139a 20 1664       211            jsr  sendcmd            ; send cmd string
  249.                          212    
  250.       139d ad 1306       213            lda  BUFLOC             ; Set up zero page indirect pointer.
  251.       13a0 85 fa         214            sta  BUFFER
  252.       13a2 ad 1307       215            lda  BUFLOC+1
  253.       13a5 85 fb         216            sta  BUFFER+1
  254.                          217    
  255.       13a7 a0 00         218            ldy  #0                 ; clear the 'empty sector(s)' flag.
  256.       13a9 8c 130d       219            sty  flag
  257.                          220    
  258.       13ac 78            221            sei                     ; No irq's allowed during handshake.
  259.                          222    
  260.       13ad 2c dc0d       223            bit  d1icr              ; clear pending
  261.                          224    
  262.       13b0 20 169c       225            jsr CLK_CHNG            ;Change state of clock.
  263.  
  264.  
  265.  
  266.  
  267. .main.  hcd65xx v3.1    03-23-87                                                                                page     5
  268.                                                                                                         0:burst subs.src,s,r
  269.  
  270. error addr  code          seq   source statement
  271.  
  272.                          226    
  273.       13b3 ae 1308       227    1$      ldx  SECSIZE            ; Sector size gives # of pages per sector.
  274.                          228    
  275.       13b6 20 16a5       229            jsr WAIT                ;Wait for fast byte (1st is status).
  276.       13b9 ad dc0c       230            lda  d1sdr              ;Get status byte.
  277.       13bc 8d 1300       231            sta STATUS
  278.                          232    
  279.       13bf 29 0f         233            and  #15                ;Was there an error?
  280.       13c1 c9 02         234            cmp  #2                 ; 
  281.       13c3 b0 21         235            bcs  5$                 ; branch if error occured.
  282.                          236    
  283.       13c5 20 169c       237            jsr CLK_CHNG            ;Change clock so next byte is sent.
  284.                          238    
  285.       13c8 20 16a5       239    3$      jsr WAIT                ;Wait for the next byte.
  286.                          240            
  287.       13cb 20 169c       241            jsr CLK_CHNG            ;Change state of clock so next byte is sent.
  288.       13ce ad dc0c       242            lda  D1SDR              ;Get the data byte
  289.       13d1 91 fa         243            sta  (buffer),y         ; and save it 
  290.                          244                                    ;  while next byte is being transmitted.
  291.                          245    
  292.       13d3 0d 130d       246            ora  flag               ;Update 'zero' sector flag.
  293.       13d6 8d 130d       247            sta  flag
  294.                          248    
  295.       13d9 c8            249            iny                     ;Any more in this page?
  296.       13da d0 ec         250            bne  3$
  297.                          251    
  298.       13dc e6 fb         252            inc BUFFER+1
  299.       13de ca            253            dex                     ;Loop for the # of pages per sector.
  300.       13df d0 e7         254            bne 3$
  301.                          255    
  302.       13e1 ce 1313       256            dec CMDLINE+5           ;Loop for the number of sectors.
  303.       13e4 d0 cd         257            bne 1$
  304.                          258    
  305.       13e6 58            259    5$      cli
  306.                          260    
  307.       13e7 68            261            pla                     ;Restore MMU to old configuration.
  308.       13e8 8d ff00       262            sta $ff00
  309.                          263    
  310.       13eb 60            264            rts
  311.                          265    
  312.                          266    ;**************************************************************************
  313.                          267    
  314.       13ec               268    LWRITE          ;Logical sector write to the device indicated by LF.
  315.                          269                    ;The track and sector are in TRACK, SECTOR. The location
  316.                          270                    ;of start of C128 buffer containing write data in BUFLOC. 
  317.                          271                    ;Status byte from drive is returned in STATUS.
  318.                          272    
  319.       13ec a9 82         273            lda  #lburstwr
  320.       13ee 8d 1310       274            sta  cmdline+2          ; burst write
  321.       13f1 a9 01         275            lda #$01
  322.       13f3 8d 1308       276            sta SECSIZE             ; Logical sector size is always 256 bytes.
  323.       13f6 4c 1405       277            jmp WRITE
  324.                          278    
  325.                          279    
  326.       13f9               280    PWRITE          ;Physical sector write to the device indicated by LF.
  327.                          281                    ;The track and sector are in TRACK, SECTOR. The location
  328.                          282                    ;of start of C128 buffer containing write data in BUFLOC.
  329.  
  330.  
  331.  
  332.  
  333. .main.  hcd65xx v3.1    03-23-87                                                                                page     6
  334.                                                                                                         0:burst subs.src,s,r
  335.  
  336. error addr  code          seq   source statement
  337.  
  338.                          283                    ;The physical sector size in SECSIZE (1=256,2=512,4=1024).
  339.                          284                    ;Number of sectors in NUMSEC. 
  340.                          285                    ;Physical side in SIDE.
  341.                          286                    ;Status byte from drive is returned in STATUS.
  342.                          287    
  343.       13f9 a9 02         288            lda #PBURSTWR           ;Physical burst write command.
  344.       13fb ae 1309       289            ldx SIDE                ; Check which side to write to.
  345.       13fe f0 02         290            beq 1$
  346.       1400 09 10         291            ora #$10                ; If side 1, then set bit in the command byte.
  347.       1402 8d 1310       292    1$      sta  cmdline+2
  348.                          293    
  349.                          294    
  350.       1405               295    WRITE   
  351.                          296            
  352.       1405 ad ff00       297            lda $ff00               ;Save old MMU setup.
  353.       1408 48            298            pha
  354.                          299    
  355.       1409 a9 0e         300            lda #$0e                ;Set MMU for RAM0,KERNEL,I/O.
  356.       140b 8d ff00       301            sta $ff00
  357.                          302    
  358.       140e 20 167d       303            jsr SETU0               ;Put "U0" at start of command string.
  359.       1411 ad 1303       304            lda TRACK
  360.       1414 8d 1311       305            sta CMDLINE+3           ; track
  361.       1417 ad 1304       306            lda SECTOR
  362.       141a 8d 1312       307            sta CMDLINE+4           ; sector
  363.       141d ad 1305       308            lda NUMSEC
  364.       1420 8d 1313       309            sta CMDLINE+5           ; Number of sectors to write.
  365.                          310    
  366.       1423 a9 06         311            lda #$06
  367.       1425 8d 131a       312            sta CMDLEN              ;Command length.
  368.       1428 20 1664       313            jsr  sendcmd            ; send cmd string
  369.                          314    
  370.       142b ad 1306       315            lda  BUFLOC             ; Set up zero page indirect pointer.
  371.       142e 85 fa         316            sta  BUFFER
  372.       1430 ad 1307       317            lda BUFLOC+1
  373.       1433 85 fb         318            sta BUFFER+1
  374.                          319    
  375.       1435 a9 40         320            lda  #clkin             ;Initial clock status.
  376.       1437 8d 131b       321            sta  oldclk
  377.                          322    
  378.       143a a0 00         323            ldy  #0
  379.       143c 78            324            sei                     ; no irq's during burst handshake
  380.                          325    
  381.       143d ae 1308       326    1$      ldx  SECSIZE            ; Sector size gives # of pages per sector.
  382.                          327    
  383.       1440 38            328            sec                     ;Turn fast serial to output mode.
  384.       1441 20 ff47       329            jsr  spin_out
  385.                          330    
  386.       1444 ad dd00       331    2$      lda  d2pra              ;Wait for state change.
  387.       1447 4d 131b       332            eor  oldclk
  388.       144a 29 40         333            and  #clkin
  389.       144c f0 f6         334            beq  2$
  390.                          335    
  391.       144e 4d 131b       336            eor  oldclk             ;Change status of OLDCLK.
  392.       1451 8d 131b       337            sta  oldclk
  393.                          338    
  394.       1454 b1 fa         339            lda  (buffer),y         ; get data 
  395.  
  396.  
  397.  
  398.  
  399. .main.  hcd65xx v3.1    03-23-87                                                                                page     7
  400.                                                                                                         0:burst subs.src,s,r
  401.  
  402. error addr  code          seq   source statement
  403.  
  404.       1456 8d dc0c       340            sta  d1sdr              ;  & send it
  405.                          341    
  406.       1459 20 16a5       342            jsr WAIT                ;Wait for the byte to be transmitted.
  407.                          343    
  408.       145c c8            344            iny
  409.       145d d0 e5         345            bne  2$                 ;Any more left in this page?
  410.                          346    
  411.       145f e6 fb         347            inc  buffer+1
  412.       1461 ca            348            dex                     ;Loop for the # of pages per sector.
  413.       1462 d0 e0         349            bne  2$
  414.                          350    
  415.       1464 18            351            clc                     ;Turn around to input mode to get STATUS.
  416.       1465 20 ff47       352            jsr  spin_out
  417.                          353    
  418.       1468 2c dc0d       354            bit  d1icr              ; clear pending
  419.                          355    
  420.       146b 20 1688       356            jsr  clklo              ; set clock low when ready for status
  421.                          357    
  422.       146e 20 16a5       358            jsr WAIT                ;Wait for the byte to be shifted in.
  423.       1471 ad dc0c       359            lda  d1sdr              ;Get the status byte.
  424.       1474 8d 1300       360            sta STATUS              ;Save it.
  425.       1477 48            361            pha
  426.       1478 20 1693       362            jsr  clkhi              ;Release the slow clock line.
  427.       147b 68            363            pla
  428.                          364    
  429.       147c 29 0f         365            and  #15                ;Check for any error.
  430.       147e c9 02         366            cmp  #2 
  431.       1480 b0 05         367            bcs  7$                 ;  branch if there was an error.
  432.                          368            
  433.       1482 ce 1313       369            dec  CMDLINE+5          ;Loop for the number of sectors.
  434.       1485 d0 b6         370            bne  1$
  435.                          371    
  436.       1487 58            372    7$      cli
  437.                          373    
  438.       1488 68            374            pla                     ;Restore old memory configuration.
  439.       1489 8d ff00       375            sta $ff00
  440.                          376    
  441.       148c 60            377            rts
  442.                          378    
  443.                          379    ;**********************************************************************
  444.                          380    
  445.       148d               381    INQUIRE_FORMAT  ;Sends an INQUIRE DISK command to the drive indicate by
  446.                          382                    ;the logical file (LF).  Status is returned in STATUS.
  447.                          383    
  448.       148d 20 167d       384            jsr SETU0               ;Put "U0" at start of command string.
  449.       1490 a9 04         385            lda  #BURST_INQUIRE     ; inquire burst command
  450.       1492 8d 1310       386            sta  cmdline+2
  451.       1495 a9 03         387            lda #$03                ; length of command.
  452.       1497 8d 131a       388            sta CMDLEN
  453.       149a 20 1664       389            jsr  sendcmd            ; send cmd string
  454.                          390    
  455.       149d 78            391            sei                     ;Disable interrupts during handshake.
  456.                          392    
  457.       149e 2c dc0d       393            bit D1ICR               ;Clear any byte ready that's pending.
  458.                          394    
  459.       14a1 20 169c       395            jsr CLK_CHNG            ;Change clock so 1581 sends next.
  460.       14a4 20 16a5       396            jsr WAIT                ;Wait for the byte to be shifted in.
  461.  
  462.  
  463.  
  464.  
  465. .main.  hcd65xx v3.1    03-23-87                                                                                page     8
  466.                                                                                                         0:burst subs.src,s,r
  467.  
  468. error addr  code          seq   source statement
  469.  
  470.       14a7 ad dc0c       397            lda D1SDR               ;Get the status byte.
  471.       14aa 8d 1300       398            sta STATUS              ;Save it off.
  472.                          399    
  473.       14ad 58            400            cli
  474.       14ae 60            401            rts
  475.                          402    
  476.                          403    ;**********************************************************************
  477.                          404    
  478.       14af               405    QUERY_FORMAT    ;Sends a QUERY DISK FORMAT command to the drive indicate by
  479.                          406                    ;the logical file (LF).  Physical track number to query 
  480.                          407                    ;should be provided in TRACK.  Physical side should
  481.                          408                    ;be provided in SIDE.  Status is returned in STATUS.
  482.                          409                    ;Number of sectors found on the track returned in NUMSEC.
  483.                          410                    ;Logical track number found in the sector headers returned
  484.                          411                    ;in TRACK.  Minimum logical sector number found in the
  485.                          412                    ;sector headers is returned in MINSEC.  The maximium
  486.                          413                    ;logical sector is returned MAXSEC.  Physical interleave
  487.                          414                    ;is returned in INTLV. 
  488.                          415                    ;If an error is encountered in compiling this information
  489.                          416                    ;(as indicated by STATUS), then none of the return values
  490.                          417                    ;are valid (except STATUS).
  491.                          418    
  492.       14af 20 167d       419            jsr SETU0               ;Put "U0" at start of command string.
  493.                          420    
  494.       14b2 a9 86         421            lda  #BURST_QUERY       ;QUERY DISK burst command
  495.       14b4 ae 1309       422            ldx SIDE                ; Set the side bit accordingly.
  496.       14b7 d0 02         423            bne 4$
  497.       14b9 09 10         424            ora #$10
  498.       14bb 8d 1310       425    4$      sta cmdline+2
  499.                          426    
  500.       14be ad 1303       427            lda TRACK               ; Physical track offset.
  501.       14c1 8d 1311       428            sta cmdline+3
  502.       14c4 a9 04         429            lda #$04                ; length of command.
  503.       14c6 8d 131a       430            sta CMDLEN
  504.       14c9 20 1664       431            jsr  sendcmd            ; send cmd string
  505.                          432    
  506.       14cc 78            433            sei                     ;Disable interrupts during handshake.
  507.                          434    
  508.       14cd 2c dc0d       435            bit D1ICR               ;Clear any byte ready that's pending.
  509.                          436    
  510.       14d0 20 169c       437            jsr CLK_CHNG            ;Change state of clock so 1581 sends next.
  511.       14d3 20 16a5       438            jsr WAIT                ;Wait for the first status byte.
  512.       14d6 ad dc0c       439            lda D1SDR               ;Get the status byte (status of track 0).
  513.       14d9 8d 1300       440            sta STATUS              ;Save it off.
  514.                          441    
  515.       14dc 29 0f         442            and #$0f                ;Was there an error?
  516.       14de c9 02         443            cmp #2
  517.       14e0 b0 4e         444            bcs 5$                  ; branch if there was an error.
  518.                          445    
  519.       14e2 20 169c       446            jsr CLK_CHNG            ;Change state of clock, so 1581 sends next.
  520.       14e5 20 16a5       447            jsr WAIT                ;Wait for next status byte to be ready.
  521.       14e8 ad dc0c       448            lda D1SDR               ;Get it (status of track TRACK).
  522.       14eb 8d 1300       449            sta STATUS              ;Save it.
  523.                          450    
  524.       14ee 29 0f         451            and #$0f                ;Was there an error?
  525.       14f0 c9 02         452            cmp #2  
  526.       14f2 b0 3c         453            bcs 5$                  ; branch if an error.
  527.  
  528.  
  529.  
  530.  
  531. .main.  hcd65xx v3.1    03-23-87                                                                                page     9
  532.                                                                                                         0:burst subs.src,s,r
  533.  
  534. error addr  code          seq   source statement
  535.  
  536.                          454    
  537.       14f4 20 169c       455            jsr CLK_CHNG            ;Change state of clock, so 1581 sends next.
  538.       14f7 20 16a5       456            jsr WAIT                ;Wait for 'number of sectors byte' to be ready.
  539.       14fa ad dc0c       457            lda D1SDR               ;Get it.
  540.       14fd 8d 1305       458            sta NUMSEC              ;Save it.
  541.                          459    
  542.                          460    
  543.       1500 20 169c       461            jsr CLK_CHNG            ;Change state of clock, so 1581 sends next.
  544.       1503 20 16a5       462            jsr WAIT                ;Wait for 'logical track #' byte to be ready.
  545.       1506 ad dc0c       463            lda D1SDR               ;Get it.
  546.       1509 8d 1303       464            sta TRACK               ;Save it.
  547.                          465    
  548.       150c 20 169c       466            jsr CLK_CHNG            ;Change state of clock, so 1581 sends next.
  549.       150f 20 16a5       467            jsr WAIT                ;Wait for 'minimum sector #' byte to be ready.
  550.       1512 ad dc0c       468            lda D1SDR               ;Get it.
  551.       1515 8d 130a       469            sta MINSEC              ;Save it.
  552.                          470    
  553.       1518 20 169c       471            jsr CLK_CHNG            ;Change state of clock, so 1581 sends next.
  554.       151b 20 16a5       472            jsr WAIT                ;Wait for 'maximum sector #' byte to be ready.
  555.       151e ad dc0c       473            lda D1SDR               ;Get it.
  556.       1521 8d 130b       474            sta MAXSEC              ;Save it.
  557.                          475    
  558.       1524 20 169c       476            jsr CLK_CHNG            ;Change state of clock, so 1581 sends next.
  559.       1527 20 16a5       477            jsr WAIT                ;Wait for 'interleave' byte to be ready.
  560.       152a ad dc0c       478            lda D1SDR               ;Get it.
  561.       152d 8d 130c       479            sta INTLV               ;Save it.
  562.                          480    
  563.       1530 58            481    5$      cli
  564.       1531 60            482            rts
  565.                          483    
  566.                          484    ;***************************************************************************
  567.                          485    
  568.       1532               486    MEMORY_READ     ;Burst memory read of the 1581.  Page in 1581 memory to
  569.                          487                    ;start reading at in .X, number of pages to read in .Y,
  570.                          488                    ;location to store data in C128 memory in BUFLOC.  
  571.                          489                    ;Logical file to be read from in LF.
  572.                          490    
  573.       1532 ad ff00       491            lda $ff00               ;Save old MMU setup.
  574.       1535 48            492            pha
  575.                          493    
  576.       1536 a9 0e         494            lda #$0e                ;Set MMU for RAM0,KERNEL,I/O.
  577.       1538 8d ff00       495            sta $ff00
  578.                          496    
  579.       153b 20 167d       497            jsr SETU0               ;Put "U0" at start of command string.
  580.       153e a9 3e         498            lda #$3E                ;('>') 'burst memory read' command string.
  581.       1540 8d 1310       499            sta CMDLINE+2           ;  ( "U0>MR" )
  582.       1543 a9 4d         500            lda #$4D                ;('M')
  583.       1545 8d 1311       501            sta CMDLINE+3
  584.       1548 a9 52         502            lda #$52                ;('R')
  585.       154a 8d 1312       503            sta CMDLINE+4
  586.       154d 8e 1313       504            stx CMDLINE+5           ; 1581 page to start reading from.
  587.       1550 8c 1314       505            sty CMDLINE+6           ; # of pages to read.
  588.                          506    
  589.       1553 a9 07         507            lda #$07                ; Length of command string.
  590.       1555 8d 131a       508            sta CMDLEN
  591.       1558 20 1664       509            jsr  sendcmd            ; send cmd string
  592.                          510    
  593.  
  594.  
  595.  
  596.  
  597. .main.  hcd65xx v3.1    03-23-87                                                                                page    10
  598.                                                                                                         0:burst subs.src,s,r
  599.  
  600. error addr  code          seq   source statement
  601.  
  602.       155b ad 1306       511            lda  BUFLOC             ; Set up zero page indirect pointer.
  603.       155e 85 fa         512            sta  BUFFER
  604.       1560 ad 1307       513            lda  BUFLOC+1
  605.       1563 85 fb         514            sta  BUFFER+1
  606.                          515    
  607.       1565 a9 00         516            lda  #0                 ; clear the 'empty sector(s)' flag.
  608.       1567 8d 130d       517            sta  flag
  609.                          518    
  610.       156a 78            519            sei                     ; No irq's allowed during handshake.
  611.                          520    
  612.       156b 2c dc0d       521            bit  d1icr              ; clear pending
  613.                          522    
  614.       156e 20 169c       523            jsr CLK_CHNG            ;Change state of clock.
  615.                          524    
  616.       1571 a0 00         525            ldy #0
  617.       1573 20 16a5       526    3$      jsr WAIT                ;Wait for the byte to be shifted in.
  618.                          527    
  619.       1576 20 169c       528            jsr CLK_CHNG            ;Change clock so next byte is sent.
  620.       1579 ad dc0c       529            lda  d1sdr              ; get data
  621.       157c 91 fa         530            sta  (buffer),y         ;  and save it while next byte is transmitted.
  622.                          531    
  623.       157e 0d 130d       532            ora  flag               ; Update 'zero' flag.
  624.       1581 8d 130d       533            sta  flag
  625.                          534    
  626.       1584 c8            535            iny
  627.       1585 d0 ec         536            bne  3$                 ;Any more in this page?
  628.                          537    
  629.       1587 e6 fb         538            inc BUFFER+1
  630.       1589 ce 1314       539            dec CMDLINE+6           ;Any more pages to do?
  631.       158c d0 e5         540            bne 3$
  632.                          541    
  633.       158e 58            542    5$      cli
  634.                          543    
  635.       158f 68            544            pla                     ;Restore old memory configuration.
  636.       1590 8d ff00       545            sta $ff00
  637.                          546    
  638.       1593 60            547            rts
  639.                          548    
  640.                          549    
  641.                          550    ;***************************************************************************
  642.                          551    
  643.       1594               552    MEMORY_WRITE    ;Burst memory write to the 1581's memory.  The
  644.                          553                    ;location in C128 memory to send data from in BUFLOC.
  645.                          554                    ;The page in 1581 memory to start writing to in .X.
  646.                          555                    ;The number of pages to write in .Y.  
  647.                          556                    ;Logical file to be written to in LF.
  648.                          557    
  649.       1594 ad ff00       558            lda $ff00               ;Save old MMU setup.
  650.       1597 48            559            pha
  651.                          560    
  652.       1598 a9 0e         561            lda #$0e                ;Set MMU for RAM0,KERNEL,I/O.
  653.       159a 8d ff00       562            sta $ff00
  654.                          563    
  655.       159d 20 167d       564            jsr SETU0               ;Put "U0" at start of command string.
  656.       15a0 a9 3e         565            lda #$3E                ;('>') 'burst memory write' command string.
  657.       15a2 8d 1310       566            sta CMDLINE+2           ;  ( "U0>MW" )
  658.       15a5 a9 4d         567            lda #$4D                ;('M')
  659.  
  660.  
  661.  
  662.  
  663. .main.  hcd65xx v3.1    03-23-87                                                                                page    11
  664.                                                                                                         0:burst subs.src,s,r
  665.  
  666. error addr  code          seq   source statement
  667.  
  668.       15a7 8d 1311       568            sta CMDLINE+3
  669.       15aa a9 57         569            lda #$57                ;('W')
  670.       15ac 8d 1312       570            sta CMDLINE+4
  671.       15af 8e 1313       571            stx CMDLINE+5           ; 1581 page to start writing to.
  672.       15b2 8c 1314       572            sty CMDLINE+6           ; # of pages to write.
  673.                          573    
  674.       15b5 a9 07         574            lda #$07                ; Length of command string.
  675.       15b7 8d 131a       575            sta CMDLEN
  676.                          576    
  677.       15ba 20 1664       577            jsr  sendcmd            ; send cmd string
  678.                          578    
  679.       15bd ad 1306       579            lda  BUFLOC             ; Set up zero page indirect pointer.
  680.       15c0 85 fa         580            sta  BUFFER
  681.       15c2 ad 1307       581            lda  BUFLOC+1
  682.       15c5 85 fb         582            sta  BUFFER+1
  683.                          583    
  684.       15c7 a9 40         584            lda  #clkin             ;Initial clock status.
  685.       15c9 8d 131b       585            sta  oldclk
  686.                          586    
  687.       15cc a0 00         587            ldy #0
  688.       15ce 78            588            sei                     ;No IRQ's allowed during handshake.
  689.                          589    
  690.       15cf 38            590            sec                     ; Set to output mode.
  691.       15d0 20 ff47       591            jsr SPIN_OUT
  692.                          592    
  693.       15d3 ad dd00       593    2$      lda d2pra               ;Wait for state (slow clock line) change.
  694.       15d6 4d 131b       594            eor OLDCLK
  695.       15d9 29 40         595            and #CLKIN
  696.       15db f0 f6         596            beq 2$
  697.                          597    
  698.       15dd 4d 131b       598            eor OLDCLK              ;Change status of OLDCLK variable.
  699.       15e0 8d 131b       599            sta OLDCLK
  700.                          600    
  701.       15e3 b1 fa         601            lda (BUFFER),y          ;Get data to write.
  702.       15e5 8d dc0c       602            sta D1SDR               ;Send it.
  703.                          603    
  704.       15e8 20 16a5       604            jsr WAIT                ;Wait for the byte to be sent.
  705.                          605    
  706.       15eb c8            606            iny
  707.       15ec d0 e5         607            bne 2$                  ;More in this page?
  708.                          608    
  709.       15ee e6 fb         609            inc BUFFER+1
  710.       15f0 ce 1314       610            dec CMDLINE+6           
  711.       15f3 d0 de         611            bne 2$                  ;Any more pages to send?
  712.                          612    
  713.       15f5 58            613            cli
  714.                          614    
  715.       15f6 68            615            pla                     ;Restore old memory configuration.
  716.       15f7 8d ff00       616            sta $ff00
  717.                          617    
  718.       15fa 60            618            rts
  719.                          619    
  720.                          620    ;***************************************************************************
  721.                          621    
  722.       15fb               622    DUMP_CACHE      ;Dumps the track cache at 1581 $0C00 to the physical track
  723.                          623                    ;specified in TRACK, on the side specified in SIDE.  The
  724.                          624                    ;'force' bit is set, so it is written whether it is dirty
  725.  
  726.  
  727.  
  728.  
  729. .main.  hcd65xx v3.1    03-23-87                                                                                page    12
  730.                                                                                                         0:burst subs.src,s,r
  731.  
  732. error addr  code          seq   source statement
  733.  
  734.                          625                    ;or not.
  735.                          626    
  736.       15fb 20 167d       627            jsr SETU0
  737.       15fe a9 9c         628            lda #DUMPCACHE          ;Dump track cache command.
  738.                          629    
  739.       1600 ae 1309       630            ldx SIDE                ;  Set SIDE bit accordingly.
  740.       1603 f0 02         631            beq 1$
  741.       1605 09 40         632            ora #$40
  742.                          633    
  743.       1607 8d 1310       634    1$      sta CMDLINE+2           ;  Put the command byte into command string.
  744.       160a ad 1303       635            lda TRACK
  745.       160d 8d 1311       636            sta CMDLINE+3           ;  Physical track to dump cache to.
  746.                          637    
  747.       1610 a9 04         638            lda #4
  748.       1612 8d 131a       639            sta CMDLEN              ;Length of the command string.
  749.       1615 20 1664       640            jsr SENDCMD
  750.                          641    
  751.       1618 78            642            sei                     ;Disable interrupts during handshake.
  752.                          643    
  753.       1619 2c dc0d       644            bit D1ICR               ;Clear any byte ready that's pending.
  754.                          645    
  755.       161c 20 169c       646            jsr CLK_CHNG            ;Change clock so 1581 will send status byte.
  756.       161f 20 16a5       647            jsr WAIT                ;Wait for byte to be shifted in.
  757.       1622 ad dc0c       648            lda D1SDR               ;Get the status byte.
  758.       1625 8d 1300       649            sta STATUS              ;Save it off.
  759.                          650    
  760.       1628 58            651            cli
  761.       1629 60            652            rts
  762.                          653    
  763.                          654    ;***************************************************************************
  764.                          655    
  765.       162a               656    COMPARE_MEMORY  ;Compares memory blocks in the C128 memory.
  766.                          657                    ;Number of pages to compare in .A.
  767.                          658                    ;First page of first memory block in .X.
  768.                          659                    ;First page of second memory block in .Y.
  769.                          660                    ;If they are equal, then STATUS=0.
  770.                          661    
  771.       162a 8d 131c       662            sta temp
  772.                          663    
  773.       162d ad ff00       664            lda $ff00               ;Save old MMU setup.
  774.       1630 48            665            pha
  775.                          666    
  776.       1631 a9 0e         667            lda #$0e                ;Set MMU for RAM0,KERNEL,I/O.
  777.       1633 8d ff00       668            sta $ff00
  778.                          669    
  779.       1636 86 fb         670            stx buffer+1            ;Set up MSB of 1st memory pointer.
  780.       1638 84 fd         671            sty buffer2+1           ;Set up MSB of 2nd memory pointer.
  781.       163a ae 131c       672            ldx temp                ;Number of pages to compare.
  782.                          673            
  783.       163d a9 00         674            lda #0                  ;Set up LSB's of memory pointers.
  784.       163f 85 fa         675            sta buffer
  785.       1641 85 fc         676            sta buffer2
  786.                          677    
  787.       1643 8d 1300       678            sta STATUS              ;Initialize STATUS.
  788.                          679    
  789.       1646 a0 00         680            ldy #0
  790.                          681    
  791.  
  792.  
  793.  
  794.  
  795. .main.  hcd65xx v3.1    03-23-87                                                                                page    13
  796.                                                                                                         0:burst subs.src,s,r
  797.  
  798. error addr  code          seq   source statement
  799.  
  800.       1648 b1 fa         682    2$      lda (buffer),y
  801.       164a d1 fc         683            cmp (buffer2),y
  802.       164c f0 07         684            beq 1$
  803.                          685    
  804.       164e a9 ff         686            lda #$ff                ;Not equal!  Load STATUS with nonzero.
  805.       1650 8d 1300       687            sta STATUS
  806.       1653 d0 0a         688            bne 99$                 ;  (branch always)
  807.                          689    
  808.       1655 c8            690    1$      iny
  809.       1656 d0 f0         691            bne 2$                  ;More in this page?
  810.                          692    
  811.       1658 e6 fb         693            inc buffer+1
  812.       165a e6 fd         694            inc buffer2+1
  813.       165c ca            695            dex                     ;# of pages counter.
  814.       165d d0 e9         696            bne 2$
  815.                          697                    
  816.       165f 68            698    99$     pla                     ;Restore old memory configuration.
  817.       1660 8d ff00       699            sta $ff00
  818.                          700    
  819.       1663 60            701            rts
  820.                          702    
  821.                          703    ;***************************************************************************
  822.                          704    
  823.       1664               705    SENDCMD         ;Sends the command in CMDLINE to the logical file
  824.                          706                    ;indicated by LF.  Length of the command should be in CMDLEN.
  825.                          707    
  826.       1664 ae 1302       708            ldx LF
  827.       1667 20 ffc9       709            jsr  chkout             ; channel output (pointed to by .X)
  828.       166a a2 00         710            ldx  #0
  829.       166c ac 131a       711            ldy  cmdlen             ; send cmd 
  830.       166f bd 130e       712    1$      lda  cmdline,x
  831.       1672 20 ffd2       713            jsr  bsout
  832.       1675 e8            714            inx
  833.       1676 88            715            dey
  834.       1677 d0 f6         716            bne  1$
  835.                          717    
  836.       1679 20 ffcc       718            jsr  clrchn             ; send buffered char & eoi
  837.       167c 60            719            rts
  838.                          720    
  839.                          721    ;***************************************************************************
  840.                          722    
  841.       167d a9 55         723    SETU0   lda #85                 ;'U'
  842.       167f 8d 130e       724            sta CMDLINE
  843.       1682 a9 30         725            lda #48                 ;'0'
  844.       1684 8d 130f       726            sta CMDLINE+1
  845.       1687 60            727            rts
  846.                          728    
  847.                          729    
  848.       1688               730    CLKLO                   ; set clock low
  849.       1688 48            731            pha
  850.       1689 ad dd00       732            lda  d2pra              
  851.       168c 09 10         733            ora  #clkout
  852.       168e 8d dd00       734            sta  d2pra
  853.       1691 68            735            pla
  854.       1692 60            736            rts
  855.                          737    
  856.       1693               738    CLKHI                   ; set clock high
  857.  
  858.  
  859.  
  860.  
  861. .main.  hcd65xx v3.1    03-23-87                                                                                page    14
  862.                                                                                                         0:burst subs.src,s,r
  863.  
  864. error addr  code          seq   source statement
  865.  
  866.       1693 ad dd00       739            lda  d2pra
  867.       1696 29 ef         740            and  #$ff-clkout
  868.       1698 8d dd00       741            sta  d2pra
  869.       169b 60            742            rts
  870.                          743    
  871.       169c               744    CLK_CHNG                ;  change the state of the clock line output.
  872.       169c ad dd00       745            lda D2PRA
  873.       169f 49 10         746            eor #clkout
  874.       16a1 8d dd00       747            sta D2PRA
  875.       16a4 60            748            rts
  876.                          749    
  877.       16a5               750    WAIT                    ;  wait for the shift register to be full or empty.
  878.       16a5 a9 08         751    1$      lda #8
  879.       16a7 2c dc0d       752            bit D1ICR
  880.       16aa f0 f9         753            beq 1$
  881.       16ac 60            754            rts
  882.                          755    
  883.                          756    
  884.                          757            .end
  885.     0 errors detected
  886.  
  887.  
  888.  
  889.  
  890.  
  891.  
  892.  
  893.  
  894.  
  895.  
  896.  
  897.  
  898.  
  899.  
  900.  
  901.  
  902.  
  903.  
  904.  
  905.  
  906.  
  907.  
  908.  
  909.  
  910.  
  911.  
  912.  
  913.  
  914.  
  915.  
  916.  
  917.  
  918.  
  919.  
  920.  
  921.  
  922.  
  923.  
  924.  
  925.  
  926.  
  927. .main.  hcd65xx v3.1    03-23-87                                                                                page    15
  928.                                                                                                                                 
  929.  
  930.                         symbol table
  931.         <blank> = label, <=> = symbol, <+>= multibly defined
  932.  
  933. bsout            =ffd2  buffer           =00fa  buffer2          =00fc  bufloc            1306  burst_inquire    =0004  
  934. burst_query      =0086  chkout           =ffc9  clkhi             1693  clkin            =0040  clklo             1688  
  935. clkout           =0010  clk_chng          169c  clrchn           =ffcc  cmdlen            131a  cmdline           130e  
  936. compare_memory    162a  d1icr            =dc0d  d1sdr            =dc0c  d2pra            =dd00  dev               1301  
  937. dumpcache        =009c  dump_cache        15fb  flag              130d  inquire_format    148d  intlv             130c  
  938. j_compare_memory  135b  j_dump_cache      1355  j_inquire_format  1340  j_logical_read    1346  j_logical_write   134c  
  939. j_memory_read     134f  j_memory_write    1352  j_physical_read   1343  j_physical_write  1349  j_query_format    1358  
  940. lburstrd         =0080  lburstwr         =0082  lf                1302  lread             135e  lwrite            13ec  
  941. maxsec            130b  memory_read       1532  memory_write      1594  minsec            130a  numsec            1305  
  942. oldclk            131b  pburstrd         =0000  pburstwr         =0002  pread             136b  pwrite            13f9  
  943. query_format      14af  read              1377  secsize           1308  sector            1304  sendcmd           1664  
  944. setlfs           =ffba  setnam           =ffbd  setu0             167d  side              1309  spin_out         =ff47  
  945. status            1300  temp              131c  track             1303  wait              16a5  write             1405  
  946.  
  947.  
  948.  
  949.  
  950.  
  951.  
  952.  
  953.  
  954.  
  955.  
  956.  
  957.  
  958.  
  959.  
  960.  
  961.  
  962.  
  963.  
  964.  
  965.  
  966.  
  967.  
  968.  
  969.  
  970.  
  971.  
  972.  
  973.  
  974.  
  975.  
  976.  
  977.  
  978.  
  979.  
  980.  
  981.  
  982.  
  983.  
  984.  
  985.  
  986.  
  987.  
  988.  
  989.